/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.com.hydroPK.model.skills.crafting;

import net.com.hydroPK.Engine;
import net.com.hydroPK.content.HaveItems;
import net.com.hydroPK.model.Player;

public class LeatherCrafting {

    public static final int[][] needed = {{1741, 1}, {1734, 1}, {1733, 1}};
    public static final int[][] makeInfo = {{1129, 14}, {1059, 1}, {1061, 7}, {1063, 11}, {1095, 18}, {1169, 38}, {1167, 9}};
    public static final double[] makeXp = {25, 13.8, 16.3, 22, 27, 37, 18.5};

    public LeatherCrafting(Player p, int buttonId, int packetId) {
        int times = 1;
        if (p.isBussy || buttonId == 12) {
            return;
        }

        switch (packetId) {
            case 233: //Player choose 1
                break;
            case 21: //Player choose 5
                times = 5;
                break;
            case 169: //Player choose All
                times = Engine.playerItems.invItemCount(p, 1741);
                break;
            case 43: //Player choose X
                times = p.gotInput;
                break;
        }

        if (!(p.skillLvl[12] >= makeInfo[buttonId - 28][1])) {
            p.getActionSender().sendMessage(p, "You need a crafting level of " + makeInfo[buttonId - 28][1] + " to make that.");
            return;
        }

        if (HaveItems.HaveItems(p, needed)) {
            p.requestAnim(1249, 0);
            new CraftingTimer(p, makeInfo[buttonId - 28][0], 1, makeXp[buttonId - 28], times, 1741, 1, 1249, true);
            p.isInterruptable = true;
            p.getActionSender().removeShownInterface(p);
        }
    }
}

